Optimal. Leaf size=42 \[ -\frac{(a C+b B) \log (\cos (c+d x))}{d}+x (a B-b C)+\frac{b C \tan (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0604294, antiderivative size = 42, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 36, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {3632, 3525, 3475} \[ -\frac{(a C+b B) \log (\cos (c+d x))}{d}+x (a B-b C)+\frac{b C \tan (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3632
Rule 3525
Rule 3475
Rubi steps
\begin{align*} \int \cot (c+d x) (a+b \tan (c+d x)) \left (B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx &=\int (a+b \tan (c+d x)) (B+C \tan (c+d x)) \, dx\\ &=(a B-b C) x+\frac{b C \tan (c+d x)}{d}+(b B+a C) \int \tan (c+d x) \, dx\\ &=(a B-b C) x-\frac{(b B+a C) \log (\cos (c+d x))}{d}+\frac{b C \tan (c+d x)}{d}\\ \end{align*}
Mathematica [A] time = 0.0538475, size = 59, normalized size = 1.4 \[ a B x-\frac{a C \log (\cos (c+d x))}{d}-\frac{b B \log (\cos (c+d x))}{d}-\frac{b C \tan ^{-1}(\tan (c+d x))}{d}+\frac{b C \tan (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.061, size = 66, normalized size = 1.6 \begin{align*} aBx-Cbx-{\frac{Bb\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}+{\frac{Bac}{d}}+{\frac{Cb\tan \left ( dx+c \right ) }{d}}-{\frac{Ca\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}-{\frac{Cbc}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.75158, size = 68, normalized size = 1.62 \begin{align*} \frac{2 \, C b \tan \left (d x + c\right ) + 2 \,{\left (B a - C b\right )}{\left (d x + c\right )} +{\left (C a + B b\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.35061, size = 122, normalized size = 2.9 \begin{align*} \frac{2 \,{\left (B a - C b\right )} d x + 2 \, C b \tan \left (d x + c\right ) -{\left (C a + B b\right )} \log \left (\frac{1}{\tan \left (d x + c\right )^{2} + 1}\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 2.89056, size = 82, normalized size = 1.95 \begin{align*} \begin{cases} B a x + \frac{B b \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac{C a \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} - C b x + \frac{C b \tan{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\x \left (a + b \tan{\left (c \right )}\right ) \left (B \tan{\left (c \right )} + C \tan ^{2}{\left (c \right )}\right ) \cot{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.42125, size = 68, normalized size = 1.62 \begin{align*} \frac{2 \, C b \tan \left (d x + c\right ) + 2 \,{\left (B a - C b\right )}{\left (d x + c\right )} +{\left (C a + B b\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]